// 表格列
export function getTableColumn(type) {
  const asset = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'address', title: '地址', width: '30%' },
    { field: 'num', title: '编号', width: '8%', align: 'center' },
    { field: 'roomProperty', title: '房屋性质', width: '6%', align: 'center' },
    { field: 'buildArea', title: '建筑面积', width: '6%', align: 'center' },
    { field: 'state', title: '房屋状况', width: '6%', align: 'center' },
    { field: 'charter', title: '承租人', width: '10%', align: 'center' },
    { field: 'totalHire', title: '租金', width: '6%', align: 'center' },
    { field: 'structure', title: '房屋结构', width: '6%', align: 'center' },
    { field: 'SMemo', title: '备注', width: '18%' }
  ]
  const chart = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'contractNo', title: '合同编号', width: '8%', align: 'center' },
    { field: 'charter', title: '承租人', width: '10%', align: 'center' },
    { field: 'roomAddress', title: '房屋地址', width: '23%' },
    { field: 'area', title: '计租面积', width: '6%', align: 'center' },
    { field: 'hire', title: '月租金', width: '6%', align: 'center' },
    { field: 'chartCriterion', title: '租赁标准', width: '6%', align: 'center' },
    { field: 'concludeDate.time', title: '日期', formatter: ['toDateString', 'yyyy-MM-dd'], width: '9%', align: 'center' },
    { field: 'chartBeginDate.time', title: '合同起始', formatter: ['toDateString', 'yyyy-MM-dd'], width: '9%', align: 'center' },
    { field: 'chartEndDate.time', title: '合同终止', formatter: ['toDateString', 'yyyy-MM-dd'], width: '9%', align: 'center' },
    { field: 'memo', title: '备注', width: '9%' }
  ]
  const con = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'action', title: '动作', width: '5%', align: 'center' },
    { field: 'operator', title: '操作员', width: '5%', align: 'center' },
    { field: 'scan', title: '扫描件', width: '5%', align: 'center' },
    { field: 'date', title: '日期', width: '10%', align: 'center' },
    { field: 'operatorDate', title: '操作日期', width: '10%', align: 'center' },
    { field: 'logs', title: '日志说明', width: '60%' }
  ]
  const repair = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'scan', title: '扫描件', width: '5%', align: 'center' },
    { field: 'operator', title: '操作员', width: '5%', align: 'center' },
    { field: 'date', title: '日期', width: '10%', align: 'center' },
    { field: 'operatorDate', title: '操作日期', width: '10%', align: 'center' },
    { field: 'repairCon', title: '维修情况', width: '65%' }
  ]
  const roomCheck = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'checkCon', title: '检查情况', width: '10%', align: 'center' },
    { field: 'content', title: '检查内容', width: '20%', align: 'center' },
    { field: 'isPic', title: '上传图片', width: '8%', align: 'center' },
    { field: 'checkDate', title: '检查日期', width: '7%', align: 'center' },
    { field: 'memo', title: '备注', width: '50%' }
  ]
  const safeCheck = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'checkResult', title: '检查结果', width: '10%', align: 'center' },
    { field: 'content', title: '检查内容', width: '20%', align: 'center' },
    { field: 'isPic', title: '上传图片', width: '8%', align: 'center' },
    { field: 'checkDate', title: '检查日期', width: '7%', align: 'center' },
    { field: 'state', title: '状态', width: '5%', align: 'center' },
    { field: 'memo', title: '备注', width: '45%' }
  ]
  const nowDanger = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'dangerContent', title: '隐患内容', width: '10%', align: 'center' },
    { field: 'isPic', title: '上传图片', width: '7%', align: 'center' },
    { field: 'lookDate', title: '发现日期', width: '10%', align: 'center' },
    { field: 'state', title: '状态', width: '5%', align: 'center' },
    { field: 'memo', title: '备注', width: '63%' }
  ]
  const nonpayment = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'hire', title: '租金', width: '10%', align: 'center' },
    { field: 'beginDate.time', title: '开始日期', formatter: ['toDateString', 'yyyy-MM-dd'], width: '20%', align: 'center' },
    { field: 'endDate.time', title: '结束日期', formatter: ['toDateString', 'yyyy-MM-dd'], width: '20%', align: 'center' },
    { field: 'chartCriterion', title: '合同标准', width: '15%', align: 'center' },
    { field: 'hireDate', title: '交租日期', width: '20%', align: 'center' },
    { field: 'state', title: '交租状态', width: '10%', align: 'center' }
  ]
  const deducted = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'hire', title: '租金', width: '5%', align: 'center' },
    { field: 'beginDate.time', title: '开始日期', formatter: ['toDateString', 'yyyy-MM-dd'], width: '10%', align: 'center' },
    { field: 'endDate.time', title: '结束日期', formatter: ['toDateString', 'yyyy-MM-dd'], width: '10%', align: 'center' },
    { field: 'chartCriterion', title: '合同标准', width: '5%', align: 'center' },
    { field: 'hireDate', title: '交租日期', width: '10%', align: 'center' },
    { field: 'optdate.time', title: '缴纳日期', formatter: ['toDateString', 'yyyy-MM-dd'], width: '10%', align: 'center' },
    { field: 'state', title: '交租状态', width: '5%', align: 'center' },
    { field: 'operator', title: '操作员', width: '5%', align: 'center' },
    { field: 'payfashion', title: '支付方式', width: '10%', align: 'center' },
    { field: 'instruction', title: '说明', width: '25%' }
  ]
  const marginPay = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'amount', title: '保证金', width: '5%', align: 'center' },
    { field: 'printcount', title: '打印次数', width: '10%', align: 'center' },
    { field: 'operator', title: '操作员', width: '5%', align: 'center' },
    { field: 'optDate.time', title: '缴纳日期', formatter: ['toDateString', 'yyyy-MM-dd'], width: '10%', align: 'center' },
    { field: 'ticketno', title: '票号', width: '10%', align: 'center' },
    { field: 'printmemo', title: '备注', width: '55%' }
  ]
  const payment = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'amount', title: '保证金', width: '5%', align: 'center' },
    { field: 'printcount', title: '打印次数', width: '10%', align: 'center' },
    { field: 'operator', title: '操作员', width: '5%', align: 'center' },
    { field: 'optDate.time', title: '缴纳日期', formatter: ['toDateString', 'yyyy-MM-dd'], width: '10%', align: 'center' },
    { field: 'ticketno', title: '票号', width: '10%', align: 'center' },
    { field: 'printmemo', title: '备注', width: '55%' }
  ]
  const asset2 = [
    { type: 'index', width: '5%', title: '序号', align: 'center' },
    { field: 'Address', title: '地址', width: '30%' },
    { field: 'Num', title: '编号', width: '8%', align: 'center' },
    { field: 'RoomProperty', title: '房屋性质', width: '6%', align: 'center' },
    { field: 'BuildArea', title: '建筑面积', width: '6%', align: 'center' },
    { field: 'State', title: '房屋状况', width: '6%', align: 'center' },
    { field: 'Charter', title: '承租人', width: '10%', align: 'center' },
    { field: 'TotalHire', title: '租金', width: '6%', align: 'center' },
    { field: 'Structure', title: '房屋结构', width: '6%', align: 'center' },
    { field: 'SMemo', title: '备注', width: '22%' }
  ]
  switch (type) {
    case 'asset':
      return asset
    case 'chart':
      return chart
    case 'con':
      return con
    case 'repair':
      return repair
    case 'roomCheck':
      return roomCheck
    case 'safeCheck':
      return safeCheck
    case 'nowDanger':
      return nowDanger
    case 'nonpayment':
      return nonpayment
    case 'deducted':
      return deducted
    case 'marginPay':
      return marginPay
    case 'payment':
      return payment
    case 'asset2':
      return asset2
    default:
      return asset
  }
}
